<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('收入情况明细列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <label>接收时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginReceiveDate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endReceiveDate]"/>
                            </li>
                            <li>
                                <label>流水号：</label>
                                <input type="text" name="lsh" th:value="${lsh}"/>
                            </li>
                            <li>
                                <label>单位编码：</label>
                                <input type="text" name="dwbm"/>
                            </li>
                            <li>
                                <label>单位名称：</label>
                                <input type="text" name="dwmc"/>
                            </li>
                            <li>
                                <label>收入金额：</label>
                                <input type="text" name="income"/>
                            </li>
                            <li>
                                <label>缴款码：</label>
                                <input type="text" name="jkm"/>
                            </li>
                            <li>
                                <label>缴款人：</label>
                                <input type="text" name="jkr"/>
                            </li>
                            <li>
                                <label style="width:80px">待查流水号：</label>
                                <input type="text" name="dclsh"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:incomemx:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/incomemx";
        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                showFooter: true,
                modalName: "收入情况明细",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'receiveDate',
                    title: '接收时间'
                },
                {
                    field: 'lsh',
                    title: '流水号'
                },
                {
                    field: 'jkm',
                    title: '缴款码'
                },
                {
                    field: 'jkr',
                    title: '缴款人名称'
                },
                {
                    field: 'jkyhzh',
                    title: '缴款人账号'
                },
                {
                    field: 'jkyhmc',
                    title: '缴款人银行'
                },
                {
                    field: 'dclsh',
                    title: '待查流水号'
                },
                {
                    field: 'dwbm',
                    title: '单位编码'
                },
                {
                    field: 'dwmc',
                    title: '单位名称'
                },
                {
                    field: 'xmbm',
                    title: '项目编码'
                },
                {
                    field: 'xmmc',
                    title: '项目名称'
                },
                {
                    field: 'income',
                    title: '收入金额',
   				    footerFormatter:function (value) {
   				    	var sumIncome = 0;
   				        for (var i in value) {
   				        	sumIncome += parseFloat(value[i].income);
   				        }
   				        return "总金额：" + sumIncome;
   				    }
                },
                {
                    field: 'yskm',
                    title: '预算科目代码'
                },
                {
                    field: 'yskmmc',
                    title: '预算科目名称'
                },
                {
                    field: 'remark',
                    title: '备注'
                },
                {
                    field: 'sendDate',
                    title: '上报日期'
                },
                {
                    field: 'pztxh',
                    title: '凭证头序号'
                },
                {
                    field: 'xh',
                    title: '凭证体序号'
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>